// -------------------------按钮打开-----------------------------------
// 获取全部元素并添加监听事件
document.addEventListener('DOMContentLoaded', function () {
    var dialog = document.getElementById('dialog');
    var openBtn = document.getElementById('openBtn');
    var closeBtn = document.getElementsByClassName('closeBtn')[0];

    openBtn.onclick = function () {
        dialog.style.display = "block";
    }

    closeBtn.onclick = function () {
        dialog.style.display = "none";
    }

    window.onclick = function (event) {
        if (event.target == dialog) {
            dialog.style.display = "none";
        }
    }
});

// -------------------------------------------------------------------
